<?php

namespace app\common\model\game;

use think\Model;


class Lists extends Model
{


    // 表名
    protected $table = 'game_lists';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function level()
    {
        return $this->hasMany('levels', 'game_id')->field("id,money,game_id");
    }

    public function mode()
    {
        return $this->hasMany('modes', 'game_id')->field("id,name,game_id,desc,divide_ratio");
    }

    public function subarea()
    {
        return $this->hasMany('subarea', 'game_id')->field("id,name,game_id");
    }
}
